home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 036 (1987-11-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 036 (1987-11-15)(Ossowski, Stefan)(DE)(PD).adf / SiliCon / s / ls next >
Text File  |  1989-01-18  |  659b  |  25 lines

  1. .K PAT,DIR,-L/S,1/s,2/s,3/s
  2.  
  3. ;A primitive -- and very partial -- emulation of the *n*x 'ls' command.
  4. ;Works on the current directory; for others you need the keyword 'DIR'.
  5.  
  6. echo >ram:__ls<1><2><3> "failat 25"
  7. if "<-l>" EQ ""
  8.  if "<PAT>" EQ ""
  9.   echo >>ram:__ls<1><2><3> "list dir <DIR$*"*"> QUICK"
  10.  else
  11.   echo >>ram:__ls<1><2><3> "list dir <DIR$*"*"> p <PAT> QUICK"
  12.  endif
  13. else
  14.  if "<PAT>" EQ ""
  15.   echo >>ram:__ls<1><2><3> "list dir <DIR$*"*">"
  16. else
  17.   echo >>ram:__ls<1><2><3> "list dir <DIR$*"*"> p <PAT>"
  18.  endif
  19. endif
  20. .bra (
  21. .ket )
  22. echo >>ram:__ls(1)(2)(3) "echo <** ?"
  23. echo >>ram:__ls(1)(2)(3) "endcli"
  24. newcli CON:0/0/639/199/LIST from ram:__ls(1)(2)(3)
  25.